import 'dart:ui';

import 'package:dmz/base/pageWidget/base_stateful_widget.dart';
import 'package:dmz/base/widget/defult_text_field.dart';
import 'package:dmz/base/widget/defult_widget.dart';
import 'package:dmz/business/mine/controller/lost_updata_controller.dart';
import 'package:dmz/utils/keyboard_util.dart';
import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';

class LostInputAddressPage extends BaseStatefulWidget<LostUpdataController> {
  const LostInputAddressPage({super.key});

  @override
  String titleString() => '失窃地点'.tr;

  @override
  List<Widget>? appBarActionWidget(BuildContext context) {
    return [
      DefaultText('保存'.tr, 28.sp, textColor: const Color(0xFF23C565))
          .paddingOnly(right: 32.sp)
          .addGestureDetector(() => controller.saveAddress())
    ];
  }

  @override
  bool delectControll() => false;

  @override
  get updateId => 'lostInput';

  @override
  Widget buildContent(BuildContext context) {
    return Container(
        color: Colors.transparent,
        child: Column(mainAxisAlignment: MainAxisAlignment.start, children: [
          Container(
              padding: EdgeInsets.only(
                  top: 20.sp, bottom: 20.sp, left: 44.sp, right: 44.sp),
              color: const Color(0xFF434650),
              child: Row(children: [
                Expanded(
                    child: DefultTextField(32.sp,
                        controlle: controller.textController,
                        maxLine: null,
                        hintText: '请输入失窃地点'.tr,
                        hitColor: const Color(0xB3FFFFFF))),
                Image.asset('assets/images/home/share/clean_icon.png',
                        width: 54.sp, height: 54.sp)
                    .marginOnly(left: 20.sp)
              ]))
        ])).addGestureDetector(() => KeyboardUtils.hideKeyboardGex());
  }
}
